package com.ybbase.framework.model.po.system;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 系统用户权限
 * </p>
 *
 * @author cg
 * @since 2019-12-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_user_permission")
@ApiModel(value="UserPermission对象", description="系统用户权限")
public class UserPermission extends Model<UserPermission> {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "用户编码 : 用户编码")
    private Integer userId;

    @ApiModelProperty(value = "权限编码 : 权限编码")
    private Integer perId;

    @ApiModelProperty(value = "按钮权限 : 按钮权限")
    private String buttonPer;

    @ApiModelProperty(value = "数据范围")
    private Integer dataScope;

    @ApiModelProperty(value = "数据范围方法")
    private String dataMethod;

    @Override
    protected Serializable pkVal() {
        return this.userId;
    }

}
